<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<jsp:include page = "../metadatos.jsp" flush = "True" />
<html>
    <head>
        <title>Bienvenido al Sistema ERP MAGR </title>
    </head>
    <body>
        <div class="wrapper">
            <header class="header">
                <img src="./resources/Logo.PNG" />
            </header><!-- .header-->
            <main class="content">
                <form class="formee" method="post" action="./Users?action=infoPartner&index=2">
                    <fieldset>
                        <legend> Generales </legend>

                        <!-- LISTA DE ERRORES -->
                        <c:if test="${principalSistema.nErrores>0}">
                            <div class="formee-msg-error">
                                <h3>Incidencias:</h3>
                                <ul>
                                    <c:forEach items="${principalSistema.errores}" var="e">
                                        <li><c:out value="${e}"/></li>
                                        </c:forEach>
                                </ul>
                            </div> 
                        </c:if>
                        
                        <!-- LISTA DE ADVERTENCIAS-->
                        <c:if test="${principalSistema.nAdvertencias > 0}">
                            <div class="formee-msg-warning">
                                <h3>Incidencias:</h3>
                                <ul>
                                    <c:forEach items="${principalSistema.vAdvertencias}" var="w">
                                        <li><c:out value="${w}"/></li>
                                        </c:forEach>
                                </ul>
                            </div> 
                        </c:if>

                        <div class="grid-12-12">
                            <label>Nombre(s)<em class="formee-req">*</em></label>
                            <input type="text" name="nombre" onKeyup="this.value = txt(this.value)" value="<c:out value="${principalSistema.usersDataDTO.nombre}"/>"/>
                        </div>

                        <div class="grid-6-12">
                            <label>Apellido Paterno:<em class="formee-req">*</em></label>
                            <input type="text" name="apPaterno" onKeyup="this.value = txt(this.value)" value="<c:out value="${principalSistema.usersDataDTO.apPaterno}"/>"/>
                        </div>
                        
                        <div class="grid-6-12">
                            <label>Apellido Materno:<em class="formee-req">*</em></label>
                            <input type="text" name="apMaterno" onKeyup="this.value = txt(this.value)" value="<c:out value="${principalSistema.usersDataDTO.apMaterno}"/>"/>
                        </div>

                        <div class="grid-12-12">
                            <label>Domicilio:<em class="formee-req">*</em></label>
                            <input type="text" name="direccion" onKeyup="this.value = txtalfanum(this.value)" value="<c:out value="${principalSistema.usersDataDTO.direccion}"/>"/>
                        </div>

                        <div class="grid-6-12">
                            <label>Telefono:<em class="formee-req">*</em></label>
                            <input type="text" name="telefono" onKeyup="this.value = ventero(this.value)" value="<c:out value="${principalSistema.usersDataDTO.telefono}"/>"/>
                        </div>

                        <div class="grid-6-12">
                            <label>Celular:<em class="formee-req">*</em></label>
                            <input type="text" name="celular" onKeyup="this.value = ventero(this.value)" value="<c:out value="${principalSistema.usersDataDTO.celular}"/>"/>
                        </div>

                        <fieldset>
                            <legend>Fecha Nacimiento:</legend>
                            <div class="grid-4-12">
                                <label>DIA:<em class="formee-req">*</em></label>
                                <select name="nDia" >
                                    <option value="0">Seleecione Un Dia</option>
                                    <c:forEach items="${principalSistema.diasCombo}" var="dia">
                                        <option value="<c:out value="${dia}"/>"><c:out value="${dia}"/></option>
                                    </c:forEach>
                                </select>
                            </div>
                            <div class="grid-4-12">
                                <label>MES:<em class="formee-req">*</em></label>
                                <select name="nMes" >
                                    <option value="0">Seleecione Un Mes</option>
                                    <c:forEach items="${principalSistema.mesesCombo}" var="mes">
                                        <option value="<c:out value="${mes.numeroMes}"/>"><c:out value="${mes.nombreMes}"/></option>
                                    </c:forEach>
                                </select>
                            </div>
                            <div class="grid-4-12">
                                <label>AÑO:<em class="formee-req">*</em></label>
                                <select name="nAnio" >
                                    <option value="0">Seleecione Un Anio</option>
                                    <c:forEach items="${principalSistema.aniosCombo}" var="anio">
                                        <option value="<c:out value="${anio}"/>"><c:out value="${anio}"/></option>
                                    </c:forEach>
                                </select>
                            </div>
                            <div class="grid-3-12">
                                <input type="submit" value="enviar"/>
                            </div>
                        </fieldset>
                    </fieldset>
                </form>
            </main>
        </div>
    </body>
</html>
